<!DOCTYPE html>
<html>

<head>
  <meta charset="utf-8">
  <title>折线图</title>
  <!-- 引入 echarts.js -->
  <!-- 这里是加载刚下好的echarts.min.js，注意路径 -->
  <script src="js/echarts.min.js"></script>
</head>

<body style="background: #000">
  <!-- 为ECharts准备一个具备大小（宽高）的Dom -->
  <div id="main" style="width: 1000px;height:600px;"></div>
  <script type="text/javascript">
    // 基于准备好的dom，初始化echarts实例
    var myChart = echarts.init(document.getElementById('main'));
    // 指定图表的配置项和数据
    option = {
      title: {
        text: ''
      },
      tooltip: {
        trigger: 'axis'
      },
      legend: {
        data: ['邮件营销'],
        textStyle:{
            color:'#fff'
        },
      },
      grid: { left: 50, bottom: 20, right: 20, top: 20 },
      toolbox: {
        feature: {
          saveAsImage: {}
        }
      },
      xAxis: {
        type: 'category',
        boundaryGap: false,
        data: ['周一', '周二', '周三', '周四', '周五', '周六', '周日'],
        splitLine: {
          //网格线：显示
          show: false,
          lineStyle: {
            type: "dotted",
            color: "rgba(237,240,245,0.5)"
          }
        },
        axisTick: {
          //刻度线：false隐藏
          show: true
        },
        axisLabel: {
          color: "#D2D6DB"
        },
        axisLine: {
          axisLine: {
            //轴线：隐藏
            show: true
          },
          lineStyle: {
            // x轴颜色
            color: "rgba(237,240,245,0.5)"
          }
        }
      },
      yAxis: {
        splitLine: {
          show: true,
          lineStyle: {
            // y轴颜色
            color: "blue"
          }
        },
        axisLine: {
          show: true,
          lineStyle: {
            // y轴颜色
            color: "rgba(237,240,245,0.5)"
          }
        }
      },
      series: [
        {
          name: '邮件营销',
          type: 'line',
          stack: '总量',
          data: [120, 132, 101, 134, 90, 230, 210],
          type: "line",
          smooth: true,
          showSymbol: false,
          itemStyle: {
            color: new echarts.graphic.LinearGradient(0, 0, 0, 0.9, [
              { offset: 0, color: "#3F51B5" },
              { offset: 0.3, color: "#E64A19" },
              { offset: 0.6, color: "#FFA000" },
              { offset: 1, color: "#4CAF50" }
            ])
          }
        },
      ]
    };
    // 使用刚指定的配置项和数据显示图表。
    myChart.setOption(option);

  </script>
</body>

</html>